import yaml

with open('demo.yaml', encoding='utf-8') as test:
    data = yaml.load_all(test, Loader=yaml.FullLoader)
    for i in data:
        print(i)
